type Fn = () => void;
export interface Topic {
  name: string;
  fns: Fn[];
  once: Fn[];
  sub(fn: Fn, once: boolean): void;
  unsub(fn: Fn, once: boolean): void;
  pub(args: any): void;
}
export interface TBus {
  on(type: string, fn: Fn, once?: boolean): void;
  off(type: string, fn: Fn, once?: boolean): void;
  once(type: string, fn: Fn): void;
  emit(type: string, args: any): void;
}

export default TBus;
